<?php

namespace App\Http\Requests;

use Illuminate\Foundation\Http\FormRequest;

class SuggestResources extends FormRequest
{
    /**
     * Determine if the user is authorized to make this request.
     *
     * @return bool
     */
    public function authorize()
    {
        return true;
    }

    /**
     * Get the validation rules that apply to the request.
     *
     * @return array
     */
    public function rules()
    {
        return [
            'suggest_name'=>'required',
            'suggest_title'=>'required',
            'suggest_content'=>'required',
        ];
    }


    /**
 * 获取已定义验证规则的错误消息。
     *
     * @return array
     */
    public function messages()
    {
        return [
            'suggest_name.required' => 'suggest_name必填！',
            'suggest_title.required'  => 'suggest_title必填!',
            'suggest_content.required'  => 'suggest_content必填!',
        ];
    }
}
